Skip to content

Cache download-files in Dockerfile templates by using standalone commands#848

Open
aryeila wants to merge 1 commit into
mainfrom
chana/standalone-download-files
Open

Cache download-files in Dockerfile templates by using standalone commands#848
aryeila wants to merge 1 commit into
mainfrom
chana/standalone-download-files

Conversation

@aryeila
Copy link
Copy Markdown

@aryeila aryeila commented May 27, 2026

Overview

Update the three Dockerfile templates in pkg/agentfs/examples/ to use the standalone download-files commands that ship in livekit-agents@1.5.10 (Python) and @livekit/agents@1.4.3 (Node.js). The download step now runs before COPY . ., so the layer caches across code-only changes — editing your agent no longer triggers a re-download of plugin model files.

Changes

  • node.DockerfileRUN pnpm download-files (after pnpm build, after COPY . .) → RUN npx livekit-agents download-files (before COPY . .). Drops the requirement that the user's package.json define a download-files script.
  • python.uv.DockerfileRUN uv run "{{.ProgramMain}}" download-files (after COPY . .) → RUN uv run --module livekit.agents download-files (before COPY . .).
  • python.pip.DockerfileRUN python "{{.ProgramMain}}" download-files (after COPY . .) → RUN python -m livekit.agents download-files (before COPY . .).

The new commands discover installed plugin packages (livekit-plugins-* for Python, @livekit/agents-plugin-* for Node.js) and run their download_files() step without loading the user's agent code. That's what allows the step to move ahead of the source copy.

Compatibility

These templates are rendered by the CLI when scaffolding a new agent project (lk agent init). Existing users running older SDK versions won't see this change until they regenerate. The old agent.py download-files / node dist/agent.js download-files forms still work in newer SDKs but emit a deprecation warning.

Related PRs

This is part of a coordinated rollout across four repos. Each PR updates one slice of the same migration.

Upstream SDK changes:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant